@namespace Blazorise.Docs.Docs.Examples

<Button Color="Color.Primary" Clicked="ShowCounter">Show Counter</Button>

@code {
    [Inject] public IOffcanvasService OffcanvasService { get; set; }

    public Task ShowCounter()
    {
        Random random = new();
        var newValue = random.NextInt64( 100 );
        return OffcanvasService.Show<CounterExample>( "My Custom Content!", x => x.Add( x => x.Value, newValue ) );
    }
}